package com.dp.vo;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.Table;

@Entity
@Table(name = "news_sn_area")
public class NewsSnArea implements Serializable {
    private static final long serialVersionUID = 1L;
    @EmbeddedId
    protected NewsSnAreaPK newsSnAreaPK;
    @Column(name = "softagent")
    private String softagent;
    @Column(name = "device_type")
    private Integer devicetype;
    
    public NewsSnArea() {
    }

    public NewsSnArea(NewsSnAreaPK newsSnAreaPK) {
        this.newsSnAreaPK = newsSnAreaPK;
    }

    public NewsSnArea(String sn, Integer areaid) {
        this.newsSnAreaPK = new NewsSnAreaPK(sn,areaid);
    }
   
    public NewsSnAreaPK getNewsSnAreaPK() {
		return newsSnAreaPK;
	}

	public void setNewsSnAreaPK(NewsSnAreaPK newsSnAreaPK) {
		this.newsSnAreaPK = newsSnAreaPK;
	}
	
	public String getSoftagent() {
		return softagent;
	}

	public void setSoftagent(String softagent) {
		this.softagent = softagent;
	}

	public Integer getDevicetype() {
		return devicetype;
	}

	public void setDevicetype(Integer devicetype) {
		this.devicetype = devicetype;
	}

	@Override
    public int hashCode() {
        int hash = 0;
        hash += (newsSnAreaPK != null ? newsSnAreaPK.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof NewsSnArea)) {
            return false;
        }
        NewsSnArea other = (NewsSnArea) object;
        if ((this.newsSnAreaPK == null && other.newsSnAreaPK != null) || (this.newsSnAreaPK != null && !this.newsSnAreaPK.equals(other.newsSnAreaPK))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.dp.vo.NewsSnArea[newsSnAreaPK=" + newsSnAreaPK + "]";
    }
	    
}
